<?php
//设置响应头
header("content-type:text/html;charset=utf-8");

//获取传入的参数
$name=$_GET['name'];
$pass=$_GET['pass'];
//连接数据库
$link=mysqli_connect("localhost",'root','','shop');
//设置编码
mysqli_set_charset($link,"utf8");

//sql语句
$sql="select * from user2 where name=$name and pass=$pass";
//执行sql语句，返回结果集
$result=mysqli_query($link,$sql);
//检查结果集中是否有数据
if(mysqli_fetch_row($result)){
    echo "1";
}else{
    echo "0";
}

?>